.org 0xE6818 ; Damage from Cannons

Damage_From_Cannons:

	PUSH 	{R4, LR}
	
	MOV		R4, 0								; Reduced damage = 0
	
;-------------------------------------------------------------------------------
	
	BL		Skill_Setup_Type_CO_Abilities
	
	MOV 	R1, Rank_Cannon_Guard				; Rank: Cannon Guard	
	
	BL 		Check_Skills_Equipped				; Check the Skill is equipped	
	CMP 	R0, 0								; Does CO use that skill?
	ADDNE 	R4, R4, Stats_Cannon_Guard			; If CO use skill, less damage from Cannons
	
;-------------------------------------------------------------------------------

	MOV 	R0, R4								; Total reduced damage
	
	POP 	{R4, LR}	
	BX 		LR

;-------------------------------------------------------------------------------		

	NOP
	NOP
	NOP
	NOP
	NOP
	NOP
	NOP
	NOP
	NOP
	NOP
	NOP
	NOP
	NOP


